package com.wander.controller;

import com.wander.po.BannerPO;
import com.wander.service.BannerService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * Created by zhaowentong on 2017/6/12.
 */

@Controller
public class HomeController {

    private Logger logger = LoggerFactory.getLogger(HomeController.class);

    @Autowired
    private BannerService bannerService;

    @RequestMapping("/")
    String home(ModelMap map) {
        BannerPO po = bannerService.findByUUID("2379b55e8b324662aab2f0265b7ee08e");
        logger.info("po>>>>>>>>>>>>>>>>>>>>>>>" + po);
        map.put("banner", po);
        return "index";
    }

}
